# -*- coding: utf-8 -*-
"""
xfree.auth.services

这是xfree中与认证相关服务实现的公共模块。
如果你正在开发插件或扩展xfree，应该从这个模块导入，而不是从子模块导入。

:copyright: (c) 2014 - 2018 the xfree Team.
:license: BSD，更多细节见LICENSE
"""

# 从当前包的activation子模块中导入AccountActivator类
from.activation import AccountActivator
# 从当前包的authentication子模块中导入多个类和函数
from.authentication import (
    BlockTooManyFailedLogins,  # 阻止过多登录失败相关的类
    BlockUnactivatedUser,  # 阻止未激活用户的类
    DefaultxfreeAuthProvider,  # 默认的xfree认证提供器类
    FailedLoginConfiguration,  # 登录失败配置相关的类
    MarkFailedLogin,  # 标记登录失败的类
    PluginAuthenticationManager  # 插件认证管理器类
)
# 从当前包的factories子模块中导入多个工厂函数
from.factories import (
    account_activator_factory,  # 账户激活器工厂函数
    authentication_manager_factory,  # 认证管理器工厂函数
    reauthentication_manager_factory,  # 重新认证管理器工厂函数
    registration_service_factory,  # 注册服务工厂函数
    reset_service_factory  # 重置服务工厂函数
)
# 从当前包的password子模块中导入ResetPasswordService类
from.password import ResetPasswordService
# 从当前包的registration子模块中导入多个与注册相关的类
from.registration import (
    EmailUniquenessValidator,  # 邮箱唯一性验证器类
    UsernameRequirements,  # 用户名字段要求类
    UsernameUniquenessValidator,  # 用户名唯一性验证器类
    UsernameValidator  # 用户名字段验证器类
)

# 定义了使用from xfree.auth.services import *时可以导入的名称
__all__ = (
    "AccountActivator",
    "account_activator_factory",
    "authentication_manager_factory",
    "BlockTooManyFailedLogins",
    "BlockUnactivatedUser",
    "DefaultxfreeAuthProvider",
    "EmailUniquenessValidator",
    "FailedLoginConfiguration",
    "MarkFailedLogin",
    "PluginAuthenticationManager",
    "reauthentication_manager_factory",
    "registration_service_factory",
    "ResetPasswordService",
    "reset_service_factory",
    "UsernameRequirements",
    "UsernameUniquenessValidator",
    "UsernameValidator",
)